//错误提示
export const errorMsg = (title) => {
  title = title + "";
  wx.showToast({
    title,
    mask: true,
    icon: 'none',
    duration: 1500
  })
}


//获取参数

export const getQueryString = (name, str) => {

  var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");

  var r = str.match(reg);

  if (r != null) return unescape(r[2]);

  return null;
}

